<!DOCTYPE html>
<!-- 
┏┓╋┏┓╋┏┓╋╋╋╋╋╋┏━┓
┃┃╋┃┃╋┃┃╋╋╋╋╋╋┃┏┛
┃┃╋┃┣━┛┣┳━━┳━┳┛┗┳━━┳━┓┏━━┓
┃┃╋┃┃┏┓┣┫┏┓┃┏╋┓┏┫┏┓┃┏┓┫┏┓┃
┃┗━┛┃┗┛┃┃┏┓┃┃┃┃┃┃┏┓┃┃┃┃┗┛┃
┗━━━┻━━┻┻┛┗┻┛┗┻┛┗┛┗┻┛┗┻━┓┃
╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┏━┛┃
╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┗━━┛

http://udfang.com
Work with us? We're a fun bunch!  http://udfang.com/about
-->
<html lang="zh-CN">
<head>
    <title><?php e($building->info->seo_title); ?></title>
    <meta content='IE=Edge' http-equiv='X-UA-Compatible'>
    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
    <!-- <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> -->
    <?php if(is_plusfang_server_name()) : ?>
        <link rel="shortcut icon" href="/youju100.ico">
        <link rel="stylesheet" href="//at.alicdn.com/t/font_v574eiyliz0ssjor.css">
    <?php elseif(!is_fang90_server_name() && !is_plusfang_server_name()) : ?>
        <link rel="shortcut icon" href="/favicon.ico">
    <?php else :?>
        <link rel="shortcut icon" href="/f90.ico">
    <?php endif; ?>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimal-ui" />
    <meta content='<?php e($building->info->seo_keywords); ?>' name='keywords'>
    <meta content='<?php e($building->info->seo_description); ?>' name='description'>
    <link rel="stylesheet" href="/assets/css/building/reset.css" />
    <link rel="stylesheet" href="/assets/css/building/index_3.0.css" />
    <link rel="stylesheet" href="/assets/css/building/landingpage.css" />
    <link rel="stylesheet" href="/assets/css/building/information.css" />
    <link rel="stylesheet" href="/assets/css/building/common.css" />
    <link rel="stylesheet" href="/assets/css/building/photoswipe.css" />
    <link rel="stylesheet" href="/assets/css/building/default-skin.css" />
    <link rel="stylesheet" href="/assets/css/building/zoom.css" />
    <script src="/assets/js/building/jquery-1.11.1.min.js"></script>
   
    <style type="text/css">
    /*去除百度地图版权*/
    .anchorBL{ 
    	display:none; 
    } 
    </style>
    <script type="text/javascript">
   		$(function(){
   			
		    	/*var modularListsOffSetTop = $('.landingpage-wrapper').offset().top;*/
			   
			    /*alert(landingpageWrapperOffSetTop);*/
			   
			    $(window).scroll(function() {
			    	var modularListsOffSetTop = $('.landingpage-wrapper').offset().top;
			    	var landingpageWrapperOffSetTop = $('#lpjs').offset().top-30;
				    var infomationOffSetTop = $('#lpxx').offset().top-30;
				    var mapWrapperOffSetTop = $('#zbpt').offset().top-30;
				    var xglpWrapperOffSetTop = $('#xglp').offset().top-280;
				    $(document).resize(function() {
				    	var modularListsOffSetTop = $('.landingpage-wrapper').offset().top;
				        landingpageWrapperOffSetTop = $('#lpjs').offset().top-30;
				        infomationOffSetTop = $('#lpxx').offset().top-30;
				        mapWrapperOffSetTop = $('#zbpt').offset().top-30;
				        xglpWrapperOffSetTop = $('#xglp').offset().top;
				    });
			    	var h=$(window).scrollTop();
			    	/*alert(h);*/
			    	if(h>=xglpWrapperOffSetTop){
			        	$('.moving-nav ul li').eq(3).find('a').addClass('active-nav');
			        	$('.moving-nav ul li').eq(3).siblings().find('a').removeClass('active-nav');
			        }else if(h>=mapWrapperOffSetTop){
			        	$('.moving-nav ul li').eq(2).find('a').addClass('active-nav');
			        	$('.moving-nav ul li').eq(2).siblings().find('a').removeClass('active-nav');
			        }else if(h>=infomationOffSetTop){
			        	$('.moving-nav ul li').eq(1).find('a').addClass('active-nav');
			        	$('.moving-nav ul li').eq(1).siblings().find('a').removeClass('active-nav');
			        	
			        }else if(h>=landingpageWrapperOffSetTop){
			        	$('.moving-nav ul li').eq(0).find('a').addClass('active-nav');
			        	$('.moving-nav ul li').eq(0).siblings().find('a').removeClass('active-nav');
			        }
			        
			        
			        if(h<modularListsOffSetTop){
			        	$('.house-name').css({
			        		'position':'inherit',
			        		'width':'100%',
			        		'top':0
			        	});
			        	var w=$(window).width();
						if(w<960){
							$('.house-name').show();
						}
						$(window).resize(function(){
							var w=$(window).width();
							if(w<960){
								$('.house-name').show();
							}
						})
			        	
			        	
			        }else if(h>=infomationOffSetTop+80){
			        	$('.house-name').css({
			        		'position':'absolute',
			        		'top':infomationOffSetTop,
			        		'width':'100%'
			        	});
			        }else if(h>modularListsOffSetTop){
			        	$('.house-name').css({
			        		'position':'fixed',
			        		'top':'49px',
			        		'width':'33%'
			        	});
			        	var w=$(window).width();
						if(w<960){
							$('.house-name').hide();
						}
						$(window).resize(function(){
							var w=$(window).width();
							if(w<960){
								$('.house-name').hide();
							}
						})
			        	
			        }
			    })
			
				var w=$(window).width();
				if(w<960){
					$('#allmap').css('height',350);
					$('.share').hide();
				}else{
					$('#allmap').css('height',650);
					$('.share').show();
				}
				$(window).resize(function(){
					var w=$(window).width();
					if(w<960){
						$('#allmap').css('height',350);
						$('.share').hide();
					}else{
						$('#allmap').css('height',650);
						$('.share').show();
					}
				})
		})
    
    
    	
    </script>
</head>
<body>
	<div class="full_cover"></div>
    <?php $this->load->view('../home/nav') ?>
    <section class="house-wrapper clearfix">
        <div class="house-detail">
            <div class="album">
                <span>共<?php if(isset($building->photos['lpzp']) && !empty($building->photos['lpzp']['pc_num'])) { echo $building->photos['lpzp']['pc_num'];}else{echo "1";} ?>张照片</span>
                <div class="gallery">
                <?php if(isset($building->photos['lpzp']) && !empty($building->photos['lpzp']['pc'])){ ?>
                    <?php foreach ($building->photos['lpzp']['pc'] as $key => $value) { ?>
                        <!-- <img src="<?php //echo $value->absolute_url;?>"> -->
                        <div><a href="<?php echo $value->absolute_url;?>"><img src="<?php echo $value->absolute_url;?>" /></a></div>
                    <?php }?>
                <?php }else{ ?>
                        <div><a href="/assets/images/building/information.png"><img src="/assets/images/building/information.png" /></a></div>
                        <div><a href="/assets/images/building/information.png"><img src="/assets/images/building/information.png" /></a></div>
                <?php }?>
                </div>
            </div>
			<!--<p><?php echo $building->info->recommend_info;?></p>-->
        </div>
        <div class="house-desc">
        	<div class="house-name">
        		<div class="little_cover"></div>
        		<h3><?php echo $building->name;?></h3>
                <div class="clearfix">
                	<span class="sales"><?php if($building->status == 2){echo "在售";}else if($building->status == 1){echo "待售";}else{echo "售罄";};?></span>
                	<?php if(!empty($building->tag['putong'])){ ?>
	                    <?php foreach ($building->tag['putong'] as $key => $value) { ?>
	                        <span class="tip"><?php echo $value->tag_name;?></span>
	                    <?php }?>
	        		<?php }?>
                </div>

        		<p class="price">
                <?php if($building->info->price_desc != ''): ?>
                                <?php echo $building->info->price_desc; ?>
                <?php else: ?>
                    <?php if ($building->ave_price != 0): ?>
                        <span> ¥<?php e($building->ave_price); ?></span>元/平米
                    <?php else: ?>
                        <span>价格待定</span>
                    <?php endif; ?>
                <?php endif; ?>
                </p>
        		<!-- <div class="full_cover"></div> -->

        		<input class="code" type="button" value="扫一扫免费通话" id="scan_code">
        		<input type="button" name="" id="dial" value="一键免费通话" class="code freecall" />
                <div class="ewm">
                    <img src="http://assets-cdn.udfang.com/qrcode/<?php echo $building->id; ?>/pc_<?php echo $channel;?>.png" alt="">
                    <b>扫一扫免费通话</b>
                </div>
                <div class="clearfix">
                	<input class="book" type="button" value="立即预约看房">
        			<input class="attention" type="button" value="手机关注楼盘">
                </div>
        		
        		<h5>基本信息</h5>
        		<?php if(!empty($building->open_time)) : ?><p>开盘时间：<?php echo $building->open_time;?></p><?php endif;?>
        		<?php if(!empty($building->pass_time)) : ?><p>交房时间：<?php echo $building->pass_time;?></p><?php endif;?>
        		<p>楼盘地址：<?php echo $building->info->address;?></p>
                <?php if(!empty($building->info->main_hx)) : ?><p>主力户型：<?php echo $building->info->main_hx;?></p><?php endif;?>
        	</div>
        	<div class="house-news">
        		<h3><a href="#">更多</a>楼盘动态<span>最新</span></h3>

        		
        		<?php if(!empty($building->news)){ ?>
                    <?php foreach ($building->news as $key => $value) { ?>
                        <p><a href="<?php echo $value->whole_url;?>" target="_blank"><?php echo $value->title;?></a></p>
                    <?php }?>
                <?php }?>

        	</div>
<!--         	<div class="house-service">
        		<h3>专车服务<span>免费</span></h3>
        		<p>利用我们免费的个性化专车服务预约看房。</p>
        		<input class="require" type="button" value="告诉我们您的看房需求">
        	</div> -->
        </div>
        
        <p class="house-txt"><?php echo $building->info->recommend_info;?></p>
    </section>

    <?php if(!empty($building->photos['tstp'])) : ?>
    <section class="landingpage-wrapper"><a name="lpjs" id="lpjs"></a>
        <div class="inner">
            <h3>楼盘介绍</h3>
            <div class="landingpage">

                <section class="modular-lists">
                <?php if(!empty($building->photos['tstp']['pc'])) : ?>
                <?php foreach ($building->photos['tstp']['pc'] as $key => $pcPhoto) : ?>
                    <div class="modular-list m1">
                        <picture>
                            <!--[if IE 9]><video style="display: none;"><![endif]-->
                            <source <?php if (!$is_ie) e('data-'); ?>srcset="<?php $mbPhotoArr = $building->photos['tstp']['mobile']; 
                                if (count($mbPhotoArr) >= $key+1) {
                                    e($mbPhotoArr[$key]->absolute_url);
                                } ?>" media="(max-width: 760px)">
                            <source <?php if (!$is_ie) e('data-'); ?>srcset="<?php e($pcPhoto->absolute_url); ?>" media="(max-width: 1400px)">
                            <source <?php if (!$is_ie) e('data-'); ?>srcset="<?php e($pcPhoto->absolute_url); ?>">
                            <!--[if IE 9]></video><![endif]-->
                            <img class="lazyload<?php if ($is_ie) echo '_disable'; ?>"  <?php if ($is_ie): ?>srcset="<?php e($pcPhoto->absolute_url); ?>"<?php endif; ?> src="/assets/images/building/blank.png" alt="">
                        </picture>
                    </div>
                <?php endforeach; ?>
                <?php endif;?>
                </section>
            </div>
        </div>
    </section>
    <?php endif;?>
    
    <section class="infomation"><a name="lpxx" id="lpxx"></a>
        <div class="inner">
            <h3>楼盘信息</h3>
            <div class="infomation-list clearfix">
        			<?php if ($building->info->address): ?><p><span>楼盘地址：</span><span><?php e($building->info->address); ?></span></p><?php endif; ?>
        			<?php if ($building->info->sale_address): ?><p><span>售楼处地址：</span><span><?php e($building->info->sale_address); ?></span></p><?php endif; ?>
					<?php if ($building->vendor): ?><p><span>开发商：</span><span><?php e($building->vendor->developer_name); ?></span></p><?php endif; ?>
                    <?php if ($building->open_time): ?><p><span>开盘时间：</span><span><?php e($building->open_time); ?></span></p><?php endif; ?>
                    <?php if ($building->info->floor_space): ?><p><span>占地面积：</span><span><?php e($building->info->floor_space); ?>平米</span></p><?php endif; ?>
                    
                    <?php if ($building->info->lvhua_lv): ?><p><span>绿化率：</span><span><?php e($building->info->lvhua_lv); ?>%</span></p><?php endif; ?>
                    <?php if ($building->info->chewei_shu): ?><p><span>车位数：</span><span><?php e($building->info->chewei_shu); ?></span></p><?php endif; ?>
                    <?php if ($building->info->chanquan_n): ?>
                        <p><span>产权年限：</span><span>
                        <?php if ($building->info->chanquan_n == '-1') { ?><?php echo "永久"; ?>   
                        <?php }else{ ?>
                            <?php e($building->info->chanquan_n); ?>年
                        <?php } ?>
                        </span></p><?php endif; ?>
                    <?php if ($building->info->zhuangxiu_bz): ?><p><span>装修标准：</span><span><?php e($building->info->zhuangxiu_bz); ?></span></p><?php endif; ?>

                    <?php if ($building->info->wuye_fei): ?><p><span>物业费：</span><span><?php e($building->info->wuye_fei); ?>元/平米</span></p><?php endif; ?>
                    <?php if ($building->pass_time): ?><p><span>交房时间：</span><span><?php e($building->pass_time); ?></span></p><?php endif; ?>
                    
                    <?php if ($building->info->all_space): ?><p><span>建筑面积：</span><span><?php e($building->info->all_space); ?>平米</span></p><?php endif; ?>
                    <?php if ($building->info->rongji_lv): ?><p><span>容积率：</span><span><?php e($building->info->rongji_lv); ?></span></p><?php endif; ?>
                    <?php if ($building->info->guihua_shu): ?><p><span>规划户数：</span><span><?php e($building->info->guihua_shu); ?></span></p><?php endif; ?>
                    <?php if ($building->info->chewei_bi): ?><p><span>车位比：</span><span><?php e($building->info->chewei_bi); ?></span></p><?php endif; ?>
                    <?php if ($building->info->zhuangxiu_qk): ?><p><span>装修情况：</span><span><?php e($building->info->zhuangxiu_qk); ?></span></p><?php endif; ?>
                    
                </div>
                
            </div>
    </section>

    <?php if(!in_array($building->id, [1862])) :?>
    <section class="map-wrapper"><a name="zbpt" id="zbpt"></a>
        <h3>周边配套</h3>
        <div class="map">
        	<div class="cover-nav"></div>
        	<div class="result_wrap">
        		<ul id="tabs" class="clearfix">
	    			<li class="tabs_current" onclick="qiehuan(0)">教育</li>
	    			<li onclick="qiehuan(1)">交通</li>
	    			<li onclick="qiehuan(2)">购物</li>
	    			<li onclick="qiehuan(3)">医疗</li>
	    		</ul>
	        	<div class="details_wrap" id="r-result">
	        		
	        	</div>
        	</div>
            <div id="allmap" style="width: 100%;height: 650px;">
            	
            </div>
        </div>
        <?php if(!empty($building->info->life)) : ?><p>生活配套：<?php echo $building->info->life;?></p><?php endif;?>
        <?php if(!empty($building->info->education)) : ?><p>教育配套：<?php echo $building->info->education;?></p><?php endif;?>
        <?php if(!empty($building->info->traffic)) : ?><p>交通出行：<?php echo $building->info->traffic;?></p><?php endif;?>
        <?php if(!empty($building->info->hospital)) : ?><p>医疗配套：<?php echo $building->info->hospital;?></p><?php endif;?>
    </section>
    <?php endif; ?>
    <?php if ($related_items) : ?>
    <section class="similar" id="xglp">
        <div class="inner">
            <div class="title">
                <h3>相关楼盘</h3>
            </div>
        </div>
    </section>
    <section class="similar">
        <div class="inner">
            <div class="similar-last"></div>
            <ul class="similar-list">
            <?php $similarNumber = 0; ?>
            <?php foreach ($related_items as $key => $buildingItem) : ?>
            <?php $similarNumber++; if ($similarNumber < 5) : ?>
                <li class="similar-grid-block">
                    <a href="<?php echo site_url("building/{$buildingItem->city->code}/{$buildingItem->id}"); ?>"  >
                        <img src="<?php e($buildingItem->cover_absolute_url); ?>" class="lazyload" width="100%">
                        <p class="name"><?php e($buildingItem->name); ?></p>
                        <p class="price"><?php if ($buildingItem->ave_price != 0): ?><span> ¥<?php e($buildingItem->ave_price); ?></span>元/平米<?php else: ?>价格待定<?php endif; ?></p>
                        <p class="number"><?php if ($buildingItem->tag): foreach ($buildingItem->tag['putong'] as $ptTag) : ?><span><?php e($ptTag->tag_name); ?></span><?php endforeach; endif;?></p>
                    </a>
                </li>
            <?php endif; ?>
            <?php endforeach; ?>
            </ul>
            <div class="similar-next"></div>
            <div class="clearfix"></div>
        </div>

        <ul class="similar-list-back" style="display: none;">
            <?php $similarNumber = 0; ?>
            <?php foreach ($related_items as $key => $buildingItem) : ?>
            <?php $similarNumber++; if ($similarNumber >= 5) : ?>
                <li class="similar-grid-block">
                    <a href="<?php echo site_url("building/{$buildingItem->city->code}/{$buildingItem->id}"); ?>">
                        <img src="<?php e($buildingItem->cover_absolute_url); ?>" class="lazyload" width="100%">
                        <p class="price"><?php if ($buildingItem->ave_price != 0): ?><span><?php e($buildingItem->ave_price); ?></span>元/平米<?php else: ?>价格待定<?php endif; ?></p>
                        <p class="number"><?php if ($buildingItem->tag): foreach ($buildingItem->tag['putong'] as $ptTag) : ?><span><?php e($ptTag->tag_name); ?></span><?php endforeach; endif;?></p>
                    </a>
                </li>
            <?php endif; ?>
            <?php endforeach; ?>
        </ul>

    </section>
    <?php endif; ?>
    
    <?php $this->load->view('../home/footer') ?>
	
    <div class="moving-nav">
    	<div class="cover_nav aaa"></div>
        <div class="inner">
            <ul>
                <li><a id="nav-lpjs" class="active-nav" href="#lpjs">楼盘介绍</a></li>
                <li><a id="nav-lpxx" href="#lpxx">楼盘信息</a></li>
                <li><a id="nav-zbpt" href="#zbpt">周边配套</a></li>
                <li><a id="nav-xglp" href="#xglp">相关楼盘</a></li>
            </ul>
<!--             <div class='right'>
					<a class='share' href='#'> 分享 </a>
	                <div class="share-list">
	                    <a href="javascript:void(0)" class="sina">新浪微博</a>
	                    <a href="javascript:void(0)" class="weixin">微信</a>
	                    <a href="javascript:void(0)" class="qq">QQ空间</a>
	                </div>
            	</div> -->
        </div>
    </div>

    <!--<div class="callmetip"></div>-->
<!--     <div class="callme">
        <input type="text" class="number number-check" placeholder="请输入您的号码" maxlength="11" />
        <input type="button" class="freecall" value="一键免费通话" />
        <input type="button" class="book" value="立即预约" />
        <input type="button" class="layout" value="户型" />
    </div> -->
    <!--验证码弹框-->
    <div class="tips_yzm wp_tips_yzm" style="display:none">
        <div id='yzmvid_2' class="yzm_wrap2">
            <input class='mfzxyzmip_2' type='text' placeholder='请输入验证码' />
            <img id='mfzxyzm_2' src="" />
            <span class='hyp_2'>换一个</span>
        </div>
        <button id='tips_yzm_ok'>确定</button>
        <button id='tips_yzm_close'>关闭</button>
    </div>
    <!--底部电话号码验证提示框-->
    <div class="tips" style="display:none">
        <p></p>
        <button>确定</button>
    </div>
    <!--/底部电话号码验证提示框-->
    <!--弹出咨询-->
    <div class="tanchu_mask" style="display: none;"></div>
    <div class="tanchu tanchu_1" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>一键免费通话</h5>
        </div>
        <div class="textbar">
            <p><span>1,输入手机号码</span><span class="arrow-to-right"></span><span>2,电话确认成功</span></p>
            <input class="phone-input" type="text" placeholder="请输入号码" value="" />
            <div class="random">
                <input class='code-input' type='text' placeholder='请输入验证码' />
                <img src="/assets/images/building/random.png" alt="">
                <a href="javascript:void(0)">换一张</a>
                <div class="clearfix"></div>
            </div>
            <div class="sms">
                <input class='code-input' type='text' placeholder='请输入验证码' />
                <input class="sms-btn code-btn" type="button" value="获取验证码" />
                <div class="clearfix"></div>
            </div>
            <input id="BtnPhone_5" class="SubBtn SubBtn_dh" type="submit" value="一键免费通话" />
        </div>
    </div>
    <!--/弹出咨询-->
    <!--弹出提示-->
    <div class="tanchu tanchu_2 tanchu_ok" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
        </div>
        <div class="textbar">
            <p>恭喜，预约现场看房成功！</p>
            <input class="SubBtn SubBtn_tc2" type="button" value="确定" />
        </div>
    </div>
    <!--手机端预约弹窗-->
    <div class="tanchu tanchu-mobile tanchu_x" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>立即预约看房</h5>
        </div>
        <div class="textbar">
            <p><span>1.输入手机号码</span><span class="arrow-to-right"></span><span>2.预约看房成功</span></p>
            <input class="phone-input" type="text" placeholder="请输入手机号码" value="" id="yuyue_mb" />
            <input id="BtnPhone_6" class="SubBtn SubBtn_dh" type="submit" value="预约看房" />
            <!-- <p>通过免费通话获得更详细的咨询和帮助！</p> -->
        </div>
    </div>
    <!--提示弹窗-->
    <div class="tanchu tanchu_7 tc_3" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5 id="tc_3_h">立即预约</h5>
        </div>
        <div class="textbar">
            <p><img src="/assets/images/building/success.png" alt=""></p>
            <p id="tc_3_p">预约看房成功</p>
        </div>
    </div>
    <!--桌面端预约弹窗-->
    <div class="tanchu tanchu-pc tanchu_x" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>立即预约看房</h5>
        </div>
        <div class="textbar">
            <p><span>1.输入手机号码</span><span class="arrow-to-right"></span><span>2.预约看房成功</span></p>
            <input class="phone-input" type="text" placeholder="请输入手机号码" value="" id="yuyue_mb_pc" />
            <div class="random_yy" style="display:none; margin-left:5%;margin-bottom:10px;">
                <input class='code-input' type='text' placeholder='请输入验证码' id="phone_code_address_input" style="margin-left:0;width:180px;" />
                <button class="sms-btn code-btn" onclick="refreshPhoneCode($('#yuyue_mb_pc').val());" style="margin-right:18px;">获取验证码</button>
                <div class="clearfix"></div>
            </div>
            <input id="BtnPhone_6_pc" class="SubBtn SubBtn_dh" type="submit" value="预约看房" />
            <!-- <p>通过免费通话获得更详细的咨询和帮助！</p> -->
        </div>
    </div>
    <div class="tanchu tanchu_9" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>手机关注楼盘</h5>
        </div>
        <div class="textbar">
            <p><span>优惠和变价消息会通过短信通知您</span></p>
            <input id="discount-note-9" class="phone-input" type="text" placeholder="请输入号码" value="" />
            <input id="BtnPhone_9" class="SubBtn SubBtn_dh" type="submit" value="确认" />
        </div>
    </div>
    <div class="tanchu tanchu_2 tanchu_4" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
        </div>
        <div class="textbar">
            <p>请正确输入手机号码！</p>
            <input class="SubBtn SubBtn_tc2" type="button" value="确定" />
        </div>
    </div>
    <!--/弹出提示-->
    <div class="tanchu tanchu-mobile tanchu_3" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>一键免费通话</h5>
        </div>
        <div class="textbar">
            <p><span>1,输入手机号码</span><span class="arrow-to-right"></span><span>2,接通售楼处</span></p>
            <input class="phone-input" type="text" placeholder="请输入手机号码" value="" />
            <input id="BtnPhone_5" class="SubBtn SubBtn_dh" type="submit" value="一键免费通话" />
            <p>通过免费通话获得更详细的咨询和帮助！</p>
        </div>
    </div>
    <!-- 领取购房优惠 -->
    <div class="tanchu tanchu_5" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>一键免费领取购房优惠</h5>
        </div>
        <div class="textbar">
            <p><span>1,输入手机号码</span><span class="arrow-to-right"></span><span>2,接通售楼处</span></p>
            <div class="discount">
                <p>免费购房优惠</p>
                <div class="discount-price">3万抵6万</div>
                <p class="fan">购房立享10000元返现</p>
            </div>
            <input class="phone-input" type="text" placeholder="请输入号码" value="" />
            <div class="sms">
                <input class='code-input' type='text' placeholder='请输入验证码' />
                <input class="sms-btn code-btn" type="button" value="获取验证码" />
                <div class="clearfix"></div>
            </div>
            <input id="BtnPhone_5" class="SubBtn SubBtn_dh" type="submit" value="一键免费通话" />
            <p class="tip">我们将通过手机短信发送优惠代码到您的手机，购房时通过线下售楼处U点房优惠专区时即可。</p>
        </div>
    </div>

    <div class="tanchu tanchu_6" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>一键免费通话</h5>
        </div>
        <div class="textbar">
            <p>正在拨打电话: <span class="number">13911011011</span> <a href="javascript:void(0)">修改号码</a></p>
            <p class="loading">请稍后</p>
            <p class="small">关闭对话框不会影响您的通话</p>
        </div>
    </div>

    <div class="tanchu tanchu_7" style="display: none;">
        <div class="titlebar">
            <button class="close"></button>
            <h5>立即预约</h5>
        </div>
        <div class="textbar">
            <p><img src="/assets/images/building/success.png" alt=""></p>
            <p>预约看房成功</p>
        </div>
    </div>
    
    <span class="bdsharebuttonbox" style="display: none;">
        <a title="分享到微信" href="#" class="bds_weixin" data-cmd="weixin"></a>
        <a title="分享到新浪微博" href="#" class="bds_tsina" data-cmd="tsina"></a>
        <a title="分享到QQ空间" href="#" class="bds_qzone" data-cmd="qzone"></a>
    </span>

    
    <script src="/assets/js/building/share.js"></script>
    <script src="/assets/js/building/information.js"></script>
    <script src="/assets/js/building/jquery.scrollstop.js"></script>
    <script src="/assets/js/building/photoswipe.min.js"></script>
    <script src="/assets/js/building/photoswipe-ui-default.js"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=8526cdc9eaa7faa35706d8d0fe54528d"></script>
 	<!--<script src="/assets/js/building/map.js" type="text/javascript" charset="utf-8"></script>-->
    <script src="/assets/js/building/zoom.js"></script>
    <script src="/assets/js/building/picturefill.js"></script>
    <script src="/assets/js/building/lazysizes.js"></script>
    <script src="/assets/js/building/common.js"></script>
    <script src="/assets/js/building/jquery.lazyload.js"></script>
    <script type="text/javascript" charset="utf-8">
	  $(function() {
	     $("img.lazy").lazyload({
	         effect : "fadeIn", 
	         placeholder : "img/grey.gif",
	     });
	
	  });
  </script>
    <script type="text/javascript"> 
     var lat = <?php echo isset($building->lat) ? $building->lat : 31.22; ?>; //纬度
    var lng = <?php echo isset($building->lng) ?$building->lng : 121.48; ?>; //经度
    // 百度地图API功能
    var map = new BMap.Map("allmap");            // 创建Map实例
    var mPoint = new BMap.Point(lng,lat);
    map.centerAndZoom(mPoint,15);
    var opts = {type: BMAP_NAVIGATION_CONTROL_LARGE}    
    map.addControl(new BMap.NavigationControl(opts));
    
   /* var options = {
        onSearchComplete: function(results){
            // 判断状态是否正确
            if (local1.getStatus() == BMAP_STATUS_SUCCESS){
                var s = [];
                for (var i = 0; i < results.getCurrentNumPois(); i ++){
                    s.push(results.getPoi(i).title);
                }
                document.getElementById("result").innerHTML = s.join("<br/>");
            }
        }
    };*/
    /*var local =  new BMap.LocalSearch(map,{renderOptions: {map: map, autoViewport: false}}); 
    var local1 =  new BMap.LocalSearch(map,options);
    local.searchNearby('学校',mPoint,1000);
    local1.searchNearby('学校',mPoint,1000);*/
    
    var myKeys = ["学校",["公交","地铁"],"商场","医院"];
	var local = new BMap.LocalSearch(map, {
		renderOptions:{map: map, panel:"r-result"},
		pageCapacity:5
	});
	local.searchInBounds(myKeys[0], map.getBounds(),1000);
	function qiehuan(index){
        local.setPageCapacity(index==1 ? 3 : 5);
		local.searchInBounds(myKeys[index], map.getBounds(),1000);
	}
	
	
  //创建和初始化地图函数：
    function initMap(){
        // createMap();//创建地图
        setMapEvent();//设置地图事件
        addMapControl();//向地图添加控件
        addMarker();//向地图中添加marker
    }
    //地图事件设置函数：
    function setMapEvent(){
        map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
        //map.enableScrollWheelZoom();//启用地图滚轮放大缩小
        map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
        map.enableKeyboard();//启用键盘上下左右键移动地图
    }
    
    //地图控件添加函数：
    function addMapControl(){
       
    var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
    map.addControl(ctrl_sca);
    }
    
    //标注点数组
    var markerArr = [{title:"<?php echo $building->name; ?>",content:"当前的位置：<?php echo $building->info->address; ?>",point:" <?php echo $building->lng; ?> | <?php echo $building->lat; ?> ",isOpen:0,icon:{w:23,h:25,l:0,t:21,x:9,lb:12}}
         ];
    //创建marker
    function addMarker(){
        for(var i=0;i<markerArr.length;i++){
            var json = markerArr[i];
            var p0 = json.point.split("|")[0];
            var p1 = json.point.split("|")[1];
            var point = new BMap.Point(p0,p1);
            var iconImg = createIcon(json.icon);
            var marker = new BMap.Marker(point,{icon:iconImg});
            var iw = createInfoWindow(i);
            var label = new BMap.Label(json.title,{"offset":new BMap.Size(json.icon.lb-json.icon.x+10,-20)});
            marker.setLabel(label);
            map.addOverlay(marker);
            label.setStyle({
                        borderColor:"#808080",
                        color:"#333",
                        cursor:"pointer"
            });
            
            (function(){
                var index = i;
                var _iw = createInfoWindow(i);
                var _marker = marker;
                _marker.addEventListener("click",function(){
                    this.openInfoWindow(_iw);
                });
                _iw.addEventListener("open",function(){
                    _marker.getLabel().hide();
                })
                _iw.addEventListener("close",function(){
                    _marker.getLabel().show();
                })
                label.addEventListener("click",function(){
                    _marker.openInfoWindow(_iw);
                })
                if(!!json.isOpen){
                    label.hide();
                    _marker.openInfoWindow(_iw);
                }
            })()
        }
    }
    //创建InfoWindow
    function createInfoWindow(i){
        var json = markerArr[i];
        var iw = new BMap.InfoWindow("<b class='iw_poi_title' title='" + json.title + "'>" + json.title + "</b><div class='iw_poi_content'>"+json.content+"</div>");
        return iw;
    }
    //创建一个Icon
    function createIcon(json){
        var icon = new BMap.Icon("http://app.baidu.com/map/images/us_mk_icon.png", new BMap.Size(json.w,json.h),{imageOffset: new BMap.Size(-json.l,-json.t),infoWindowOffset:new BMap.Size(json.lb+5,1),offset:new BMap.Size(json.x,json.h)})
        return icon;
    }
    
    initMap();//创建和初始化地图

    
</script>
    <script>
        var buildingId = <?php echo $building->id; ?>;
        var buildingName = "<?php echo $building->name; ?>";
        var building_code = "<?php echo $building->code; ?>";
        var building_pc_phone = "<?php echo empty($building->phone) ? '' : $building->phone['pc']->number;  ?>";
        var building_mobile_phone = "<?php echo empty($building->phone) ? '' : $building->phone['mobile']->number;  ?>";
        var buildingPhoneExt = <?php if ($is_mobile || $is_pad): ?>building_mobile_phone<?php else: ?>building_pc_phone<?php endif; ?>; // 分机号
        var buildingCookieId = "<?php echo $view_log['building_cookie_id']; ?>";
        var isMobile = <?php echo $is_mobile ? 1 : 0; ?>;
        var isPad = <?php echo $is_pad; ?>;
        var platform = <?php echo $is_mobile ? 2 : 1; ?>;
        var buildingChannel = "<?php echo $channel; ?>";
        // var lat = <?php echo $building->lat; ?>; //纬度 
        // 免费咨询
        $(".freecall").click(function(){
            var eventName = $(this).attr("event-name");
            if (isMobile && isPad==0) {
                // 移动端
                location.href = '<?php 
                    $building_mobile_phone = empty($building->phone) ? '' : $building->phone['mobile']->number;
                    $phoneStr = ($channel=='other' || strlen($building_mobile_phone) <= 5) ? $building->telephone.','.$building_mobile_phone : $building_mobile_phone;
                    echo 'tel:'.$phoneStr; 
                ?>';
                //editCtoBtnuseraction('', 2);
                //buildingEventLog(eventName, '');
                // 思盈
                //siyin_event("mob_freecall", "5c07aa1b91e7dff9faf6033e1da0348b", "");
                //秒针
                //stm_clicki('send', 'event', '免费通话', '点击');
                // 百度
                //_hmt.push(['_trackPageview', '/mfth']);
            }
        });
        $(".book").click(function(){
            $(".tanchu_mask").show();
            $(".tanchu-pc").show();
        });
        // 预约看房
        $("#BtnPhone_6_pc").click(function(){

                var mobile = $("#yuyue_mb_pc").val();
                var phone_code = $("#phone_code_address_input").val();
                if (mobile == ""){
                    $(".tanchu_4").show();
                    return false;
                }
                if (!mobile.match(/^1[3|4|5|7|8]\d{9}$/)){
                    $(".tanchu_4").show()
                    return false;
                }
                //往数据查询系统接口传数据
                // editCtoBtnuseraction(mobile, 10);
                // // 思盈
                // siyin_event("pc_Reserve", "ab300d115f010cc62e8821fb2d61858c", mobile);
                
                // //秒针
                // stm_clicki('send', 'event', '预约看房', '点击');
                $.ajax({
                    method: "GET",
                    url: "/buildings/front/building/kanfang",
                    data: {mobile:mobile, building_id:buildingId,phone_code:phone_code}
                }).done(function(data){
                    if (data == 'ok') {
                        // 弹出ok
                        $(".tanchu-pc").hide();
                        $(".tanchu_mask").show();
                        $(".tanchu_7").show();
                        $("#yuyue_mb_pc").val('');
                        //buildingEventLog(eventName, mobile);
                        // 品友
                        //signUpCvtN('预约看房', buildingName);
                        if (buildingId == 1632) {
                            // 百度dsp
                            _hmt.push(['_trackPageview', '/building/shanghai/1632/campaign?qd=bd&mz_ca=2022228&mz_sp=70tqI&mz/success']);
                        }
                    }else if(data == 'auth_code') {
                           $(".random_yy").show();
                    }else {
                        alert(data);
                    }
                })
        });

    //cto统计
    function editCtoBtnuseraction(mobile, type){
        var yyname = '';
        // if(type == 0 || type == 2){
        //     signUpEntryCvtN("拨打电话", buildingName);
        // }else if(type == 1){
        //     signUpEntryCvtN("发送给我", buildingName);
        // }else if(type == 10 || type == 11){
        //     // yyname = encodeURI(encodeURI($(".myName").val()));
        //     signUpEntryCvtN("预约看房", buildingName);
        // }
        if(mobile == ''){
            mobile = isMobile ? 'mobile' : 'pc';
        }
        var page = "";//"{$page}";
        //保存用户信息
        //mobile手机号，projectNo分机号，type[pc免费通话是0 ,pc发送地址是1,3免费咨询，4发送给我,5,立即参加，6加载更多 9查看户型图 10预约看房，移动端拨打电话2，加载更多为7 8查看户型图 11预约看房 ],channel渠道数字标识，page站内导航中楼盘网站编码
        var data = "mobile="+mobile+"&projectNo="+buildingPhoneExt+"&type="+type+"&channel="+buildingChannel+"&page="+page+"&cookie="+buildingCookieId+"&name="+yyname+"&ip=<?php e($ip_address); ?>";
        var url = "http://test.qwzt.net:8080/dms/customer/custAction?"+data;
        $.ajax({
            url:url,
            type:"get",
            dataType:'jsonp'
        });
    }
    
    $(".attention").click(function(){
            $(".tanchu_mask").show();
            $(".tanchu_9").show();
        });
    //手机关注楼盘
    $("#BtnPhone_9").click(function(){
            var mobile = $("#discount-note-9").val();
            // 不输手机号placeholder变红
            if (mobile == ""){
                 $(".tanchu_4").show();
                return false;
            }
            // 手机号不符合正则表达式变红
            if (!mobile.match(/^1[3|4|5|7|8]\d{9}$/)){
                 $(".tanchu_4").show();
                return false;
            }
            $.ajax({
                method: "GET",
                url: "/buildings/front/building/savePhone",
                data: {mobile:mobile, building_id:buildingId,action:5}
            }).done(function(data){
                if (data == 'ok') {
                    $(".tanchu_9").fadeOut();
                    $("#discount-note-9").val("");
                    // 弹出ok
                    $(".tanchu_mask").show();
                    $("#tc_3_h").text("关注成功");
                    $("#tc_3_p").text("优惠和变价消息会通过短信通知您");
                    $(".tc_3").show();
                } else {
                    alert(data);
                }
                // $(".tanchu_mask").fadeOut();
            })
        });
        // 发送短信验证码
    function refreshPhoneCode(mobile) {

        var count = 59;
        $(".sms-btn").attr("disabled", true);
        $(".sms-btn").addClass("code-btn-disable");
        $(".sms-btn").html("重新获取(60)");
        var countdown = setInterval(settime, 1000);

        $.getJSON("/buildings/front/building/ajaxSendCode",{mobile:mobile, building_code:building_code},function(logJson) {
            if (logJson.status == 'ok') {
                alert("验证码发送成功");
            }else{
                alert(logJson.status);
            }
        });

        function settime() {
            $(".sms-btn").html("重新获取(" + count + ")");

            if (count == 0) {
                clearInterval(countdown);
                $(".sms-btn").removeClass("code-btn-disable");
                $(".sms-btn").html("获取验证码");
                $(".sms-btn").attr("disabled", false);
            }
            count--;
        }
    }
    </script>
    <!-- 美恰 -->
    <?php if($building->info->chat_switch == 1): ?>
    <script type='text/javascript'>
        function meiqiaPanelVisibility(visibility) {
            if (visibility === 'visible' && isFang90com) {
                pyRegisterZixunCvt();
            }
        }
        (function(m, ei, q, i, a, j, s) {
            m[a] = m[a] || function() {
                (m[a].a = m[a].a || []).push(arguments)
            };
            j = ei.createElement(q),
                s = ei.getElementsByTagName(q)[0];
            j.async = true;
            j.charset = 'UTF-8';
            j.src = i + '?v=' + new Date().getUTCDate();
            s.parentNode.insertBefore(j, s);
        })(window, document, 'script', '//static.meiqia.com/dist/meiqia.js', '_MEIQIA');
        _MEIQIA('entId', 17887);
        // 获取聊天窗口可见性
        _MEIQIA('getPanelVisibility', meiqiaPanelVisibility);
    </script>
    <?php endif; ?>
</body>
</html>